package com.yyge.controller.admin.mapstruct;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yyge.common.vo.resp.PageResp;
import com.yyge.controller.admin.employee.req.EmployeeReq;
import com.yyge.controller.admin.employee.resp.EmployeeResp;
import com.yyge.entity.Employee;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface EmployeeConverter {
    EmployeeConverter MAPPER = Mappers.getMapper(EmployeeConverter.class);

     @Mapping(source="records",target="rows")
     PageResp<EmployeeResp> convert(Page list);

     Employee convert(EmployeeReq req);

     List<EmployeeResp> convert(List<Employee> list);

     EmployeeResp convert(Employee obj);
}

